<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib uri = "http://java.sun.com/jsp/jstl/functions" prefix = "fn" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-81">
  <%@ include file="/WEB-INF/include/meta.jsp"%>
  <%@ include file="/WEB-INF/include/css.jsp"%>
  <link href="${ctx.resource}/css/goals.css" rel="stylesheet">
  <title>基础</title>
</head>
<body>
  <body>
    <div class="page-group">
      <div class="page page-current" style="background: #eeeeee;">
        <header class="bar bar-nav fs-header-small">
          <a href="${ctx.host}/rounds/${courseRoundId}/basic-information/student-assessment<c:choose><c:when test='${not empty scheduleId}'>?scheduleId=${scheduleId}</c:when><c:otherwise><c:if test='${not empty back}'>?back=${back}</c:if></c:otherwise></c:choose>" class="icon icon-left pull-left"></a>
          <h1 class="title">学员基础数据</h1>
        </header>
        <div class="content">
          <form method="POST" action="${ctx.host}/rounds/${courseRoundId}/basic-information/basic-data">
            <input type="hidden" name="_method" value="PATCH">
          
            <div class="content-block-title" style="margin-top: .75rem;">心肺</div>
            <div class="list-block basic-test-box no-margin">
              <ul>
                <li class="item-content">
                  <div class="item-inner">
                    <div class="item-title item-label">静态心率</div>
                    <div class="item-input flex-box">
                      <input type="number" name="restingHeartRate" value="${basicData.restingHeartRate}" class="flex-1" placeholder="请输入"/>
                      <span class="flex-shrink" style="width: 2rem;">次/分</span>
                    </div>
                  </div>
                </li>
                <li class="item-content">
                  <div class="item-inner">
                    <div class="item-title item-label">最大心率<br><small>220 - 年龄</small></div>
                    <div class="item-input flex-box">
                      <input class="flex-1" type="number" name="maxHeartRate" value="${basicData.maxHeartRate}" placeholder="请输入"/>
                      <span class="flex-shrink" style="width: 2rem;">次/分</span>
                    </div>
                  </div>
                </li>
                <%-- <li class="item-content">
                  <div class="item-inner">
                    <div class="item-title item-label">最佳燃脂心率<br><small>最大心率的60% - 80%</small></div>
                    <div class="item-input flex-box">
                      <input class="flex-1" type="number" name="burnFatRate" value="${basicData.burnFatRate}" placeholder="请输入"/>
                      <span class="flex-shrink" style="width: 2rem;">次/分</span>
                    </div>
                  </div>
                </li> --%>
                <li class="item-content item-link">
                  <div class="item-inner">
                    <div class="item-title item-label">1分钟波比跳</div>
                    <div class="item-input flex-box">
                      <input class="picker" data-name="burpee" type="text" 
                      data-val="${basicData.standardBobi}" 
                      data-default-val = "${not empty basicData.standardBobi ? (basicData.standardBobi ? '标准' : '简化') : ''}" 
                      value="${not empty basicData.standardBobi ? (basicData.standardBobi ? '标准' : '简化') : ''}" placeholder="请选择" />
                      <input type="hidden" name="standardBobi" value="${basicData.standardBobi}">
                    </div>
                  </div>
                </li>
                <li class="item-content">
                  <div class="item-inner">
                    <div class="item-title item-label">1分钟波比跳-数量</div>
                    <div class="item-input flex-box">
                      <input class="flex-1" name="bobi" type="number" value="${basicData.bobi}" placeholder="请输入"/>
                      <span class="flex-shrink" style="width: 2rem;">个</span>
                    </div>
                  </div>
                </li>
                <li class="align-top item-content">
                  <div class="item-inner">
                    <div class="item-title item-label">心血管病史(如有)</div>
                    <div class="item-input" >
                      <textarea style="height: 3rem; text-align: right;" placeholder="请填写" name="cardiovascular">${basicData.cardiovascular}</textarea>
                    </div>
                  </div>
                </li>
              </ul>
            </div>
            
            <div class="content-block-title" style="margin-top: .75rem;">基础力量</div>
            
            <div class="list-block no-margin basic-test-box">
              <ul>
                <li class="item-content item-link">
                  <div class="item-inner">
                    <div class="item-title item-label">静蹲</div>
                    <div class="item-input">
                      <input type="text" name="" class="basic-power" data-name="picker1" 
                      data-val="${basicData.staticSquat}" 
                      data-default-val= "${basicData.staticSquat.staticSquat}" 
                      value="${basicData.staticSquat.staticSquat}">
                      <input type="hidden" name="staticSquat" value="${basicData.staticSquat}" placeholder="请选择" />
                    </div>
                  </div>
                </li>
                <li class="item-content item-link">
                  <div class="item-inner">
                    <div class="item-title item-label">俯卧撑(30s)</div>
                    <div class="item-input">
                      <input type="text" name="" class="basic-power" data-name="picker2" 
                      data-val= "${basicData.pushUp}" 
                      data-default-val = "${basicData.pushUp.pushUp}" 
                      value="${basicData.pushUp.pushUp}" placeholder="请选择" />
                      <input type="hidden" name="pushUp" value="${basicData.pushUp}">
                    </div>
                  </div>
                </li>
                <li class="item-content item-link">
                  <div class="item-inner">
                    <div class="item-title item-label">两头起(30s)</div>
                    <div class="item-input">
                      <input type="text" name="" class="basic-power" data-name="picker3" 
                      data-val= "${basicData.vUp}"
                      data-default-val = "${basicData.vUp.vUp}"
                      value="${basicData.vUp.vUp}" placeholder="请选择" />
                      <input type="hidden" name="vUp" value="${basicData.vUp}">
                    </div>
                  </div>
                </li>
              </ul>
            </div>
            
            <div class="list-block basic-test-box">
              <ul>
                <li class="item-content">
                  <div class="item-inner">
                    <div class="item-title item-label" style="min-width: 5rem;">运动病史</div>
                    <div class="item-input">
                      <div style="padding-top: .45rem; padding-bottom: .3rem; text-align: right;">
                        <label style="margin-left: .25rem ;"><input type="checkbox" name="diseases" value="HYPERTENSION" <c:if test="${fn:contains(basicData.disease, '0')}">checked</c:if>>&nbsp;高血压</label>
                        <label style="margin-left: .25rem ;"><input type="checkbox" name="diseases" value="HYPOTENSION" <c:if test="${fn:contains(basicData.disease, '1')}">checked</c:if>>&nbsp;低血压</label>
                        <br>
                        <label style="margin-left: .25rem ;"><input type="checkbox" name="diseases" value="GOUT" <c:if test="${fn:contains(basicData.disease, '2')}">checked</c:if>>&nbsp;痛风</label>
                        <label style="margin-left: .25rem ;"><input type="checkbox" name="diseases" value="CARDIOPATHY" <c:if test="${fn:contains(basicData.disease, '3')}">checked</c:if>>&nbsp;心脏病</label>
                        <label style="margin-left: .25rem ;"><input type="checkbox" name="diseases" value="SPONDYLOSIS" <c:if test="${fn:contains(basicData.disease, '4')}">checked</c:if>>&nbsp;脊椎病</label>
                      </div>
                    </div>
                  </div>
                </li>
                <li class="item-content item-link">
                  <div class="item-inner">
                    <div class="item-title item-label" style="min-width: 5rem;">腹直肌分离<br><samll style="font-size: .65rem;">(妈妈学员)</samll></div>
                    <div class="item-input">
                      <input type="text" name="" data-name="mom-students" value="${basicData.rectusAbdominisIsolation.description}"  placeholder="请选择" />
                      <input type="hidden" name="rectusAbdominisIsolation" value="${basicData.rectusAbdominisIsolation}">
                    </div>
                  </div>
                </li>
                <%-- <li class="align-top item-content">
                  <div class="item-inner">
                    <div class="item-title item-label" style="min-width: 5rem;">其他</div>
                    <div class="item-input">
                      <textarea style="text-align: right;height: 3rem;" name="remark" placeholder="请输入">${basicData.remark}</textarea>
                    </div>
                  </div>
                </li> --%>
              </ul>
            </div>
            
            <p class="ev-subtitle" style="background: #dcdcdc;">体态评估</p>
            <div class="content-block-title" style="margin-top: .75rem;">静态正面站姿</div>
            <div class="list-block joint-box">
              <ul>
                <li class="item-content item-link">
                  <div class="item-inner">
                    <div class="item-title item-label">头部</div>
                    <div class="item-input">
                      <input class="picker" data-name="standingPosture1" 
                      data-val="${postureJoint.obverseHead}" 
                      data-default-val="${postureJoint.obverseHead.head}" 
                      type="text" value="${postureJoint.obverseHead.head}" placeholder="请选择"/>
                      <input type="hidden" name="obverseHead" value="${postureJoint.obverseHead}">
                    </div>
                  </div>
                </li>
                <li class="item-content item-link">
                  <div class="item-inner">
                    <div class="item-title item-label">肩胛骨</div>
                    <div class="item-input">
                      <input class="picker" data-name="standingPosture2" 
                      data-val="${postureJoint.obverseScapula}" 
                      data-default-val="${postureJoint.obverseScapula.scapula}" 
                      type="text" value="${postureJoint.obverseScapula.scapula}" placeholder="请选择"/>
                      <input type="hidden" name="obverseScapula" value="${postureJoint.obverseScapula}">
                    </div>
                  </div>
                </li>
                <li class="item-content item-link">
                  <div class="item-inner">
                    <div class="item-title item-label">骨盆</div>
                    <div class="item-input">
                      <input class="picker" data-name="standingPosture3" 
                      data-val="${postureJoint.obversePelvis}" 
                      data-default-val="${postureJoint.obversePelvis.pelvis}" 
                      type="text" value="${postureJoint.obversePelvis.pelvis}" placeholder="请选择"/>
                      <input type="hidden" name="obversePelvis" value="${postureJoint.obversePelvis}">
                    </div>
                  </div>
                </li>
                <li class="item-content item-link">
                  <div class="item-inner">
                    <div class="item-title item-label">膝关节</div>
                    <div class="item-input">
                      <input class="picker" data-name="standingPosture4" 
                      data-val="${postureJoint.obverseKneeJoint}" 
                      data-default-val="${postureJoint.obverseKneeJoint.kneeJoint}" 
                      type="text" value="${postureJoint.obverseKneeJoint.kneeJoint}" placeholder="请选择"/>
                      <input type="hidden" name="obverseKneeJoint" value="${postureJoint.obverseKneeJoint}">
                    </div>
                  </div>
                </li>
              </ul>
              <div class="content-block-title" style="margin-top: .75rem;">静态背面站姿</div>
              <ul>
                <li class="item-content item-link">
                  <div class="item-inner">
                    <div class="item-title item-label">头部</div>
                    <div class="item-input">
                      <input class="picker" data-name="backPosture1" 
                      data-val="${postureJoint.reverseHead}" 
                      data-default-val="${postureJoint.reverseHead.head}" 
                      type="text" value="${postureJoint.reverseHead.head}" placeholder="请选择"/>
                      <input type="hidden" name="reverseHead" value="${postureJoint.reverseHead}">
                    </div>
                  </div>
                </li>
                <li class="item-content item-link">
                  <div class="item-inner">
                    <div class="item-title item-label">颈椎</div>
                    <div class="item-input">
                      <input class="picker" 
                      data-name="backPosture2" 
                      data-val="${postureJoint.reverseCervicalVertebra}" 
                      data-default-val="${postureJoint.reverseCervicalVertebra.cervicalVertebra}" 
                      type="text" value="${postureJoint.reverseCervicalVertebra.cervicalVertebra}" placeholder="请选择"/>
                      <input type="hidden" name="reverseCervicalVertebra" value="${postureJoint.reverseCervicalVertebra}">
                    </div>
                  </div>
                </li>
                <li class="item-content item-link">
                  <div class="item-inner">
                    <div class="item-title item-label">髋关节</div>
                    <div class="item-input">
                      <input class="picker" 
                      data-name="backPosture3" 
                      data-val="${postureJoint.reverseHipJoint}" 
                      data-default-val="${postureJoint.reverseHipJoint.hipJoint}" 
                      type="text" value="${postureJoint.reverseHipJoint.hipJoint}" placeholder="请选择"/>
                      <input type="hidden" name="reverseHipJoint" value="${postureJoint.reverseHipJoint}">
                    </div>
                  </div>
                </li>
                <li class="item-content item-link">
                  <div class="item-inner">
                    <div class="item-title item-label">膝关节</div>
                    <div class="item-input">
                      <input class="picker" data-name="backPosture4" 
                      data-val="${postureJoint.reverseKneeJoint}" 
                      data-default-val="${postureJoint.reverseKneeJoint.kneeJoint}" 
                      type="text" value="${postureJoint.reverseKneeJoint.kneeJoint}" placeholder="请选择"/>
                      <input type="hidden" name="reverseKneeJoint" value="${postureJoint.reverseKneeJoint}">
                    </div>
                  </div>
                </li>
                <li class="item-content item-link">
                  <div class="item-inner">
                    <div class="item-title item-label">足部</div>
                    <div class="item-input">
                      <input class="picker" data-name="backPosture5" 
                      data-val="${postureJoint.reverseFoot.foot}" 
                      data-default-val="${postureJoint.reverseFoot}" 
                      type="text" value="${postureJoint.reverseFoot.foot}" placeholder="请选择"/>
                      <input type="hidden" name="reverseFoot" value="${postureJoint.reverseFoot}">
                    </div>
                  </div>
                </li>
              </ul>
              <div class="content-block-title" style="margin-top: .75rem;">自重深蹲</div>
              <ul>
                <li class="item-content item-link">
                  <div class="item-inner">
                    <div class="item-title item-label" style="min-width: 9rem;">膝盖伸展方向</div>
                    <div class="item-input">
                      <input class="picker" data-name="direction" data-val="" data-default-val="" type="text" value="${postureJoint.kneeDirection.kneeDirection}" placeholder="请选择"/>
                      <input type="hidden" name="kneeDirection" value="${postureJoint.kneeDirection}">
                    </div>
                  </div>
                </li>
                <li class="item-content item-link">
                  <div class="item-inner">
                    <div class="item-title item-label" style="min-width: 9rem;">上半身与小腿是否平行</div>
                    <div class="item-input">
                        <input class="picker" 
                        data-name="parallel" 
                        data-val="${postureJoint.parallel}" 
                        data-default-val="${empty postureJoint.parallel ? '' : (postureJoint.parallel ? '是' : '否')}" 
                        type="text" value="${empty postureJoint.parallel ? '' : (postureJoint.parallel ? '是' : '否')}" placeholder="请选择"/>
                        <input type="hidden" name="parallel" value="${postureJoint.parallel}">
                      </div>
                  </div>
                </li>
              </ul>
            </div>
                  
            <p class="ev-subtitle" style="background: #dcdcdc;">关节评估</p>
            <div class="list-block no-margin joint-box">
              <ul>
                <li class="item-content item-link">
                  <div class="item-inner">
                    <div class="item-title item-label">胸椎</div>
                    <div class="item-input">
                      <input class="picker" data-name="arthrosis" 
                      data-val="${postureJoint.thoracicVertebra}" 
                      data-default-val="${postureJoint.thoracicVertebra.description}" 
                      type="text" value="${postureJoint.thoracicVertebra.description}" placeholder="请选择"/>
                      <input type="hidden" name="thoracicVertebra" value="${postureJoint.thoracicVertebra}">
                    </div>
                  </div>
                </li>
                <li class="item-content item-link">
                  <div class="item-inner">
                    <div class="item-title item-label">腿后侧肌群</div>
                    <div class="item-input">
                      <input class="picker" data-name="arthrosis" 
                      data-val="${postureJoint.legMuscle}" 
                      data-default-val="${postureJoint.legMuscle.description}" 
                      type="text" value="${postureJoint.legMuscle.description}" placeholder="请选择"/>
                      <input type="hidden" name="legMuscle" value="${postureJoint.legMuscle}">
                    </div>
                  </div>
                </li>
                <li class="item-content item-link">
                  <div class="item-inner">
                    <div class="item-title item-label">髋关节</div>
                    <div class="item-input">
                      <input class="picker" data-name="arthrosis" 
                      data-val="${postureJoint.hipJoint}" 
                      data-default-val="${postureJoint.hipJoint.description}" 
                      type="text" value="${postureJoint.hipJoint.description}" placeholder="请选择"/>
                      <input type="hidden" name="hipJoint" value="${postureJoint.hipJoint}">
                    </div>
                  </div>
                </li>
                <li class="item-content item-link">
                  <div class="item-inner">
                    <div class="item-title item-label">肩关节</div>
                    <div class="item-input">
                      <input class="picker" data-name="arthrosis" 
                      data-val="${postureJoint.shoulderJoint}" 
                      data-default-val="${postureJoint.shoulderJoint.description}" 
                      type="text" value="${postureJoint.shoulderJoint.description}" placeholder="请选择"/>
                      <input type="hidden" name="shoulderJoint" value="${postureJoint.shoulderJoint}">
                    </div>
                  </div>
                </li>
                <li class="item-content item-link">
                  <div class="item-inner">
                    <div class="item-title item-label">踝关节</div>
                    <div class="item-input item-label">
                      <input class="picker" data-name="arthrosis" 
                      data-val="${postureJoint.ankleJoint}" 
                      data-default-val="${postureJoint.ankleJoint.description}" 
                      type="text" value="${postureJoint.ankleJoint.description}" placeholder="请选择"/>
                      <input type="hidden" name="ankleJoint" value="${postureJoint.ankleJoint}">
                    </div>
                  </div>
                </li>
                <%-- <li class="align-top item-content">
                  <div class="item-inner">
                    <div class="item-title item-label">其他</div>
                    <div class="item-input ">
                      <textarea rows="3" name="jointRemark" style="text-align: right; font-size: .65rem;" placeholder="请输入">${postureJoint.jointRemark}</textarea>
                    </div>
                  </div>
                </li> --%>
              </ul>
            </div>
            
            <div class="content-block">
              <button type="submit" class="button button-fill" style="background: #fedc32; font-size: 1rem; font-weight: bold; color: #333; min-height: 2.2rem; width: 100%;">保存</button>
            </div>
          </form>
        </div>
      </div>
    </div>
    <%@ include file="/WEB-INF/include/script.jsp"%>
    <d:resource root="${ctx.resource}/build" type="script" src="js/page/courseware/basic-data.js" />
    <script type="text/javascript">
      require(['page/courseware/basic-data'], function(page) {
        page.init({
          courseRoundId: '${courseRoundId}'
        })
      })
    </script>
  </body>
</html>
